import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';
// import VueDevTools from '@vue/devtools'
import vueDevtools from 'vite-plugin-vue-devtools';
// https://vite.dev/config/
export default defineConfig({
  esbuild: {
    loader: 'jsx',
    include: /src\/.*\.jsx?$/,
    exclude: [],
  },
  optimizeDeps: {
    esbuildOptions: {
      loader: {
        '.js': 'jsx'
      }
    }
  },
  plugins: [vue(), 
     vueDevtools()
    // VueDevTools({
    //   // 可选配置
    //   launchEditor: 'vscode' // 点击元素自动在编辑器中打开
    // })
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src')
    }
  },
  server: {
    proxy: {
      '/api': {
        target: '/',
        changeOrigin: true,

      }
    }
  },
  

})
